<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"  prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@page import="com.kcs.common.utils.commonUtils"%>
<%@page import="com.kcs.common.utils.PropsUtils"%>
<%@page import="com.kcs.common.utils.Constant"%>

<html>
<head>
<title>FX Margin - LOGIN</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript" src="jsp/script/jquery/plugin/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="jsp/script/jquery/plugin/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="jsp/script/jquery/plugin/fancybox/jquery.fancybox-1.3.4.pack.js"></script>   
<script type="text/javascript" src="jsp/script/jsDatePick.full.1.3.js"></script>   	 	 	
<script type="text/javascript" src="jsp/script/common.js"></script>  
<link rel="stylesheet" type="text/css" href="jsp/script/jquery/plugin/fancybox/jquery.fancybox-1.3.4.css"/>
<link rel="stylesheet" type="text/css" href="jsp/css/table.css"/>
<link rel="stylesheet" type="text/css" href="jsp/css/fxmarginStyle.css"/>
<link rel="stylesheet" type="text/css" href="jsp/css/jsDatePick_ltr.css" />

<script type="text/javascript">
	function showErrorMessage(msg){
		alert(msg);
	}

	function authenticateUser(){
		var tranCode = document.getElementsByName("tranCode")[0];
		tranCode.value = "authenticateUser";

		document.forms[0].submit();
	}
</script>


</head>

<body>
	<%@ include	file="include/message.jsp"%>
	
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<!-----------------------------  HEADER (image : 1024*80)  ---------------------------------->
		<tr height="80px">
			<td class="header">
				<jsp:include page="include/header.inc" />
				&nbsp;
			</td>
		</tr>
		<!-----------------------------  BODY  ---------------------------------->
		<tr>
			<td width="100%" valign="top">
				<br> <br> <br>
				<html:form action="/LoginAction.do" style="margin:0px;">
					
					<html:hidden property="tranCode"/>
					
					<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
						<tr>
							<td width="100%" align="center" colspan="2">
								<font color="red" size="4">
									<logic:present name="error_message"> 
										<%=request.getAttribute("error_message") %> 
									</logic:present> 
									<logic:notPresent name="error_message"> 
										<logic:present name="<%=Constant.ERR_ATTR%>"> 
											<%
												String msg = request.getAttribute(Constant.ERR_ATTR)+"";
												if(msg.equals("msg00021")){
													%>
														<script type="text/javascript">
															document.write(m_enter_userid);
														</script>
													<%
												}else if(msg.equals("msg00022")){
													%>
														<script type="text/javascript">
															document.write(m_enter_password);
														</script>
													<%
												}else if(msg.equals("msg00023")){
													%>
														<script type="text/javascript">
															document.write(m_ldap_fail);
														</script>
													<%
												}
											%> 
											
										</logic:present> 
									</logic:notPresent> 
								</font>
							</td>
						</tr>
						<tr>
							<td height="35" width="45%" align="right">
								<strong>User Id:&nbsp;</strong>
							</td>
							<td width="55%">
								<html:text property="userId" size="15" maxlength="20" value=""/>
							</td>
						</tr>
						<tr>
							<td height="35"  width="45%" align="right">
								<strong>Password:&nbsp;</strong>
							</td>
							<td width="55%">
								<html:password property="password" size="15" maxlength="20" value=""/>
							</td>
						</tr>
						<tr>
							<td height="35"  width="45%" align="right">&nbsp;</td>
							<td width="55%">
								<input type="button" class="button" value="Login" onClick="authenticateUser();">
							</td>
						</tr>
						<tr>
							<td width="100%" align="left" colspan="2">
								<table width="96%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td align="center">
											
										</td>
									</tr>
								</table>
							</td>
						</tr>
						
					</table>
					
				</html:form>
			</td>
		</tr>
	</table>
	
</body>
</html>
